﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sea_war.GameEngine
{
    internal class Game
    {
        public class Initialization
        {
            Random random = new Random();
            public Ship[] GetShips()
            {
                Ship[] ships = new Ship[10];

                ships[0] = new Battleship(random.Next(999999));
                ships[1] = new Cruiser(random.Next(999999));
                ships[2] = new Cruiser(random.Next(999999));
                ships[3] = new Destroyer(random.Next(999999));
                ships[4] = new Destroyer(random.Next(999999));
                ships[5] = new Destroyer(random.Next(999999));
                ships[6] = new Speedboat(random.Next(999999));
                ships[7] = new Speedboat(random.Next(999999));
                ships[8] = new Speedboat(random.Next(999999));
                ships[9] = new Speedboat(random.Next(999999));

                return ships;
            }

            public Board GetGameBoard()
            {

                BoardCage[][] BoardCages = new BoardCage[10][];

                for(int i = 0; i < 10; i++)
                {
                    for (int j = 0; j < 10; j++)
                    {
                        BoardCage boardCage = new BoardCage(random.Next(999999));
                        BoardCages[i][j] = boardCage;
                    }
                }

                Board GameBoard = new Board(random.Next(999999), BoardCages);
                return GameBoard;
            }
            public Initialization() 
            {

            }
        }
    }
}
